package com.xpgk.mvc.statistic.semployee;



import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.xpgk.mvc.base.BaseController;
import com.xpgk.mvc.organization.Organization;
import com.xpgk.mvc.scallVisit.ScallVisitXLS;

public class SemployeeController extends BaseController {

	private SemployeeService semployeeService;
	
	public void index(){
		setAttr("curOrgan", Organization.dao.findById(getCUserOrganIds()));
		render("semployee.html");
	}
	/*
	 * 查询员工信息
	 */
	public void querySemployee(){
		String json = paging(splitPage, SemployeeSQL.semployee_splitPageSelectvisit, SemployeeSQL.semployee_splitPageFromvisit);
		renderJson(json);
	}
	/*
	 * 员工档案信息导出
	 */
	public void excel() throws Exception{
		String name = getPara("nameid");
		String organIdsEmployee = getPara("organIdsEmployee");
		List<Record> result = semployeeService.customerDataQuey(organIdsEmployee,name);
		render(new SemployeeXLS(result, "电话回访查询导出","search"));

	}
}
